package suzf.top.goodscenter.service.impl

import rx.Observable
import suzf.top.base.ext.convert
import suzf.top.goodscenter.data.protocol.Category
import suzf.top.goodscenter.data.repository.CategoryRepository
import suzf.top.goodscenter.service.CategoryService
import javax.inject.Inject

/**
 *
 *========================
 * Created with AndroidStudio
 * Author:Mr.Su
 * Date:2019-09-08
 * Time:10:22
 * ========================
 */
class CategoryServiceImpl @Inject constructor() : CategoryService {

    @Inject
    lateinit var repository: CategoryRepository

    override fun getCategory(parentId: Int): Observable<MutableList<Category>?> {
        return repository.getCategory(parentId)
                .convert()
    }

}